import { http } from '@/utils/http'

export function useCustomApi() {
  return {
    // 获取所有客户资源库公司数据
    // type: 1-通过权限限制查询结果；其他值则不限制
    getCompanyAllList(type?: number) {
      return http.get<PmCustomForm[]>('/prod-api/admin-api/project/customer-resource-pool/allList' + (type ? `?type=${type}`: ""))
    },
    getCustomerResourcePoolPersonnelPage(customId?: string | number, personnelId?: string | number) {
      const query = {
        pageNo: 1,
        pageSize: 99,
        companyId: customId,
        id: personnelId,
      }
      return http.get('/prod-api/admin-api/project/customer-resource-pool-personnel/page', query)
    }
  }
}
